//
//  AFHTTPSessionManager+FCBaseAdapter.h
//  FC_CPUser
//
//  Created by ZhouYou on 2020/4/28.
//  Copyright © 2020 ZhouYou. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
#import <TMSDK/TMSDK.h>

NS_ASSUME_NONNULL_BEGIN

@interface AFHTTPSessionManager (FCBaseAdapter)

- (NSURLSessionDataTask *)FCGET:(NSString *)URLString
                     parameters:(nullable id)parameters
                        headers:(nullable NSDictionary <NSString *, NSString *> *)headers
                       progress:(nullable void (^)(NSProgress * _Nonnull))downloadProgress
                        success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
                        failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure;

- (NSURLSessionDataTask *)FCHEAD:(NSString *)URLString
                      parameters:(nullable id)parameters
                         headers:(nullable NSDictionary<NSString *,NSString *> *)headers
                         success:(nullable void (^)(NSURLSessionDataTask * _Nonnull))success
                         failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure;

- (nullable NSURLSessionDataTask *)FCPOST:(NSString *)URLString
                               parameters:(nullable id)parameters
                                  headers:(nullable NSDictionary <NSString *, NSString *> *)headers
                                 progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                                  success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                  failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;

- (NSURLSessionDataTask *)FCPUT:(NSString *)URLString
                     parameters:(nullable id)parameters
                        headers:(nullable NSDictionary<NSString *,NSString *> *)headers
                        success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
                        failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure;

- (NSURLSessionDataTask *)FCPATCH:(NSString *)URLString
                       parameters:(nullable id)parameters
                          headers:(nullable NSDictionary<NSString *,NSString *> *)headers
                          success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
                          failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure;

- (NSURLSessionDataTask *)FCDELETE:(NSString *)URLString
                        parameters:(nullable id)parameters
                           headers:(nullable NSDictionary<NSString *,NSString *> *)headers
                           success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
                           failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure;

- (NSURLSessionDataTask *)FCPOST:(NSString *)URLString
                      parameters:(nullable id)parameters
                         headers:(nullable NSDictionary<NSString *,NSString *> *)headers
       constructingBodyWithBlock:(nullable void (^)(id<AFMultipartFormData> _Nonnull))block
                        progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
                         success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure;
@end

NS_ASSUME_NONNULL_END
